import { _decorator, Component, Node } from 'cc';
import { SkillItem } from './SkillItem';
const { ccclass, property } = _decorator;
/**
 * 技能面板
 */
@ccclass('SkillView')
export class SkillView extends Component {

    @property(Node)
    sk0: Node ;

    @property(Node)
    sk1: Node ;

    @property(Node)
    sk2: Node ;

    protected onEnable(): void {
        this.sk0.getComponent(SkillItem).onClick(()=> {
            console.log('sk0');
        });
        this.sk1.getComponent(SkillItem).onClick(()=> {
            console.log('sk1');
        });
        this.sk2.getComponent(SkillItem).onClick(()=> {
            console.log('sk2');
        });
    }

    protected onDisable(): void {
        
    }


    start() {

    }

    update(deltaTime: number) {
        
    }

    onBtnClick() {
        this.node.active = false;
    }
}


